@extends('layouts.home')
@extends('layouts.nav')
@extends('layouts.top')

@section('heading')
    <h3>
        统计管理
    </h3>
    <ul class="breadcrumb">
        <li>
            <a href="#">统计管理</a>
        </li>
        <li class="active"> 销售统计</li>
    </ul>
@endsection

@section('wrapper')
    @include('share.error')
    <div class="row">
        <div class="col-sm-12">
            <section class="panel">
                <header class="panel-heading">
                    &nbsp;
                    <span class="tools pull-right">

                    </span>
                </header>
                <div class="panel-body">
                    <table class="table  table-hover general-table">
                        <thead>
                        <tr>
                            <th class="text-center">教师</th>
                            <th class="text-center">总金额</th>
                            <th class="text-center">占比</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($teachers as $teacher)
                            <tr>
                                <td class="text-center">{{ $teacher->name }}</td>
                                <td class="text-center">{{ $teacher->total }}</td>
                                <td class="text-center">
                                    <div class="progress">
                                        <div style="width: {{ $teacher->radio ? $teacher->total / $teacher->radio * 100 : 0}}%;" aria-valuemax="100" aria-valuemin="0" aria-valuenow="60" role="progressbar" class="progress-bar text-center">
                                            {{ $teacher->radio ? $teacher->total / $teacher->radio * 100 : 0}}%
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        @endforeach


                        </tbody>
                    </table>
                    <div>
                        <ul class="pagination pagination-lg">
                            {{ $teachers->links() }}
                        </ul>
                    </div>
                </div>

            </section>
        </div>
    </div>
@endsection